﻿using Magicodes.ExporterAndImporter.Core;
using Org.BouncyCastle.Crypto;
using System;
using System.Collections.Generic;
using System.Text;

namespace NP.BPMReportPlatform.Reports.DailyCloseBook.Dtos
{
    public class DailyCloseBookInput : PagedAndSortedRequestDto
    {
        /// <summary>
        /// 是否查询全部
        /// </summary>
        public bool IsQueryAll { get; set; }
        /// <summary>
        /// 流程实例编号
        /// </summary>
        public string InstanceNumber { get; set; }

        /// <summary>
        /// 创建者
        /// </summary>
        public string AddUserName { get; set; }

        /// <summary>
        /// 单据状态
        /// </summary>
        public List<string> OrderStatus { get; set; }

        /// <summary>
        /// 制单日期（开始节点）
        /// </summary>
        public DateTime? StartCreationTime { get; set; }

        /// <summary>
        /// 制单日期（结束节点）
        /// </summary>
        public DateTime? EndCreationTime { get; set; }



        /// <summary>
        /// 是否同步成功
        /// </summary>
        public bool? IsSyncSuccess { get; set; }

        /// <summary>
        /// PWS单号
        /// </summary>
        public string PWSCode { get; set; }

        /// <summary>
        /// 工厂
        /// </summary>
        public string Factory { get; set; }

        /// <summary>
        /// 物料
        /// </summary>
        public string Material { get; set; }

        /// <summary>
        /// 同步时间（开始节点）
        /// </summary>
        public DateTime? SyncStartTime { get; set; }

        /// <summary>
        /// 同步时间（结束节点）
        /// </summary>
        public DateTime? SyncEndTime { get; set; }
    }

    public class GetDailyCloseBookOutput
    {
        /// <summary>
        /// 流程编号
        /// </summary>
        [ExporterHeader("流程编号")]
        public string InstanceNumber { get; set; }

        /// <summary>
        /// 创建日期
        /// </summary>
        [ExporterHeader(IsIgnore = true)]
        public DateTime AddTime { get; set; }
        [ExporterHeader("创建日期")]
        public string AddTimeStr { get; set; }

        [ExporterHeader(IsIgnore = true)]
        public string Url { get; set; }

        /// <summary>
        /// 生产单号
        /// </summary>
        [ExporterHeader("生产单号")]
        public string PWSCode { get; set; }

        /// <summary>
        /// 生产单工厂
        /// </summary>
        [ExporterHeader("生产单工厂")]
        public string Factory { get; set; }

        /// <summary>
        /// 工厂描述
        /// </summary>
        [ExporterHeader("工厂描述")]
        public string FactoryDesc { get; set; }

        /// <summary>
        /// 申请开账原因
        /// </summary>
        [ExporterHeader("申请开账原因")]
        public string ApplyReason { get; set; }

        /// <summary>
        /// 生产单表头物料
        /// </summary>
        [ExporterHeader("生产单表头物料")]
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料描述
        /// </summary>
        [ExporterHeader("物料描述")]
        public string MaterialDesc { get; set; }

        /// <summary>
        /// 生产单数量
        /// </summary>
        [ExporterHeader("生产单数量")]
        public string Quantity { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        [ExporterHeader("单位")]
        public string Unit { get; set; }

        /// <summary>
        /// MRP
        /// </summary>
        [ExporterHeader("MRP")]
        public string MRP { get; set; }

        /// <summary>
        /// 申请人
        /// </summary>
        [ExporterHeader("申请人")]
        public string AddUserName { get; set; }

        /// <summary>
        /// 一级审批人
        /// </summary>
        [ExporterHeader("一级审批人")]
        public string Approver1UserName { get; set; }

        /// <summary>
        /// 二级审批人
        /// </summary>
        [ExporterHeader("二级审批人")]
        public string Approver2UserName { get; set; }

        /// <summary>
        /// 审批状态
        /// </summary>
        [ExporterHeader("审批状态")]
        public string StatusDesc { get; set; }
        [ExporterHeader(IsIgnore = true)]
        public int Status { get; set; }
        [ExporterHeader(IsIgnore = true)]
        public string LatestActivityName { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        [ExporterHeader(IsIgnore = true)]
        public DateTime? SyncTime { get; set; }
        [ExporterHeader("修改时间")]
        public string SyncTimeStr { get; set; }

        /// <summary>
        /// 修改结果
        /// </summary>
        [ExporterHeader("修改结果")]
        public string SyncResult { get; set; }
    }
}
